﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TheheVn
{
    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ASPxButton2_Click(object sender, EventArgs e)
        {
            string url = Request.Url.ToString();
            if (url.Contains("SubWhatDoWeDo.aspx") && !url.Contains("eSubWhatDoWeDo.aspx"))
                url = url.Replace("SubWhatDoWeDo.aspx", "eSubWhatDoWeDo.aspx");
            else if (url.Contains("SubWhoWeAre.aspx") && !url.Contains("eSubWhoWeAre.aspx"))
                url = url.Replace("SubWhoWeAre.aspx", "eSubWhoWeAre.aspx");
            else if (url.Contains("ContactUs.aspx") && !url.Contains("eContactUs.aspx"))
                url = url.Replace("ContactUs.aspx", "eContactUs.aspx");
            else if (url.Contains("WhatWeHave.aspx") && !url.Contains("eWhatWeHave.aspx"))
                url = url.Replace("WhatWeHave.aspx", "eWhatWeHave.aspx").Split('?')[0];
            else if (url.Contains("WhoAreOurPartner.aspx") && !url.Contains("eWhoAreOurPartner.aspx"))
                url = url.Replace("WhoAreOurPartner.aspx", "eWhoAreOurPartner.aspx");
            else if (url.Contains("WhoWeAre.aspx") && !url.Contains("eWhoWeAre.aspx"))
                url = url.Replace("WhoWeAre.aspx", "eWhoWeAre.aspx");
            else if (url.Contains("WhatDoWeDo.aspx") && !url.Contains("eWhatDoWeDo.aspx"))
                url = url.Replace("WhatDoWeDo.aspx", "eWhatDoWeDo.aspx");

            Response.Redirect(url);
        }

        protected void ASPxButton1_Click(object sender, EventArgs e)
        {
            string url = Request.Url.ToString();
            if (url.Contains("eSubWhatDoWeDo.aspx") )
                url = url.Replace("eSubWhatDoWeDo.aspx", "SubWhatDoWeDo.aspx");
            else if (url.Contains("eSubWhoWeAre.aspx") )
                url = url.Replace("eSubWhoWeAre.aspx", "SubWhoWeAre.aspx");
            else if (url.Contains("eContactUs.aspx"))
                url = url.Replace("eContactUs.aspx", "ContactUs.aspx");
            else if (url.Contains("eWhatWeHave.aspx"))
                url = url.Replace("eWhatWeHave.aspx", "WhatWeHave.aspx").Split('?')[0];
            else if (url.Contains("eWhoAreOurPartner.aspx"))
                url = url.Replace("eWhoAreOurPartner.aspx", "WhoAreOurPartner.aspx");
            else if (url.Contains("eWhoWeAre.aspx"))
                url = url.Replace("eWhoWeAre.aspx", "WhoWeAre.aspx");
            else if (url.Contains("eWhatDoWeDo.aspx"))
                url = url.Replace("eWhatDoWeDo.aspx", "WhatDoWeDo.aspx");

            Response.Redirect(url);
        }
    }
}